import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';

/**
 * 预约信息
 */
@Entity('appointment_info')
export class AppointmentInfoEntity extends BaseEntity {
  @Index()
  @Column({ comment: '用户ID' })
  studentId: number;

  @Index()
  @Column({ comment: '医生ID' })
  doctorId: number;

  @Index()
  @Column({ comment: '门店ID' })
  shopId: number;

  @Index()
  @Column({ comment: '操作人ID', default: 0 })
  adminId: number;

  @Index()
  @Column({ comment: '取消人ID', default: 0 })
  cancleAdminId: number;

  @Index()
  @Column({ comment: '签到人ID', default: 0 })
  signAdminId: number;

  @Column({ comment: '预约时间', type: 'datetime' })
  appointmentTime: Date;

  @Column({
    comment: '预约状态',
    dict: ['待确认', '已确认', '已取消', '已到店'],
    default: 0,
  })
  appointmentStatus: number;

  @Column({
    comment: '预约类型',
    dict: ['新客', '复查'],
    default: 0,
  })
  appointmentType: number;

  @Column({
    comment: '就诊类型',
    dict: ['未就诊', '就诊中', '完成就诊'],
    default: 0,
  })
  comeType: number;

  @Column({ comment: '备注', default: '' })
  remark: string;

  @Column({ comment: '订单ID', default: 0 })
  orderId: number;

  // @Column({ comment: '症状描述', type: 'text', nullable: true })
  // symptomDescription: string;
}
